<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>显示</title>
<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/css/personal.css" media="all">
<script type="text/javascript">
// $("#qdid").val(${map.qdid});
// $("#enroll_mode").val(${map.enroll_mode});
// $("#wechat_status").val(${map.wechat_status});


function tonull(){
	$("#mobile").val("");
	$("#qname").val("");
	$("#qdid").val("-1");
	$("#enroll_mode").val("-1");
	$("#custom_user_id").val("");
	$("#nikename").val("");
	$("#wechat_status").val("-1");
}

function toadd(){
	document.forms[0].action="/bsc/users/toadd";
	document.forms[0].submit();
}

//上一页
function up(){
	document.forms[0].action="/bsc/users/list?page="+${info.prePage};
	document.forms[0].submit();
};
//下一页
function next(){
	document.forms[0].action="/bsc/users/list?page="+${info.nextPage};
	document.forms[0].submit();
};

function deletes(id){
	 if (window.confirm ("你确定真的要删除吗")){
		 document.forms[0].action="/bsc/users/delete/"+id;
		 document.forms[0].submit();
     }
}
</script>
</head>
<body>
<section class="layui-larry-box">
<blockquote class="layui-elem-quote news_search">
<form class="form-inline" role="form" action="/bsc/users/list" method="post">

<div class="form-group">
 手机号:<input type="text" class="form-control" name="mobile" placeholder="请输入手机号" value="${map.mobile }" id="mobile">
</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<div class="form-group">
姓名:<input type="text" class="form-control" name="qname" placeholder="请输入姓名" value="${map.qname }" id="qname">
</div>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
店铺名称:
<select class="form-control" name="qdid" id="qdid">
<option value="-1">请选择</option>
<c:forEach items="${list2 }" var="shop">
<option value="${shop.shop_id }">${shop.shop_name }</option>
</c:forEach>
</select>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
注册方式:
<select class="form-control" name="enroll_mode" id="enroll_mode">
<option value="-1">请选择</option>
<option value="1">微信</option>
<option value="2">商家</option>
<option value="3">后台</option>
</select><br><br>

<div class="form-group">
会员号:<input type="text" class="form-control" name="custom_user_id" placeholder="请输入会员号" value="${map.custom_user_id }" id="custom_user_id">
</div>

<div class="form-group">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
昵称:<input type="text" class="form-control" name="nikename" placeholder="请输入昵称" value="${map.nickname }" id="nikename">
</div>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
微信状态:
<select class="form-control" name="wechat_status" id="wechat_status">
<option value="-1">请选择</option>
<option value="1">未订阅</option>
<option value="2">已订阅</option>
<option value="3">已退订</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<button type="button"   class="btn btn-danger glyphicon glyphicon-plane" onclick="tonull()">重置</button>
<button type="submit"   class="btn btn-info glyphicon glyphicon-search " >查询</button>
<button type="button" class="btn btn-success glyphicon glyphicon-plus" onclick="toadd()" >增加</button>

</blockquote>

<div class="layui-form news_list">
                    <table class="layui-table">
					    <colgroup>
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="15%"> 
					</colgroup>
					<thead>
						<tr>
							<th>头像</th>
							<th>会员号</th>
							<th>手机号</th>
							<th>姓名</th>
							<th>昵称</th>
							<th>性别</th>
							<th>店铺名称</th>
							<th>微信状态</th>
							<th>出生日期</th>
							<th>注册方式</th>
							<th>操作</th>
						</tr>
					</thead>
					
					<tbody class="news_content"  >
						<c:forEach items="${info.list }" var="users">
						<tr>
							<td><img alt="" width="80" height="50" src="/bsc${users.photo }"></td>
 							<td>${users.custom_user_id }</td> 
 							<td>${users.mobile }</td> 
							<td>${users.username }</td>
							<td>${users.nikename }</td>
							<td>
							<c:if test="${users.sex=='1' }">男</c:if>
							<c:if test="${users.sex=='2' }">女</c:if>
							<c:if test="${users.sex=='3' }">保密</c:if>
							</td>
							<td>${users.bis_Shop.shop_name }</td>
							<td>
							<c:if test="${users.wechat_status=='1' }">未订阅</c:if>
							<c:if test="${users.wechat_status=='2' }">已订阅</c:if>
							<c:if test="${users.wechat_status=='3' }">已退订</c:if>
							</td>
							<td><fmt:formatDate value="${users.born_date }" pattern="yyyy-MM-dd"/></td>
							<td>
							<c:if test="${users.enroll_mode=='1' }">微信</c:if>
							<c:if test="${users.enroll_mode=='2' }">商家</c:if>
							<c:if test="${users.enroll_mode=='3' }">后台</c:if>
							</td>
							<td>
							    <a class="btn btn-warning" href="/bsc/users/see/${users.custom_user_id}"><i class="glyphicon glyphicon-eye-open"></i> 查看详情</a>
							    
								<a class="btn btn-success" href="/bsc/users/update/${users.custom_user_id}"><i class="iconfont icon-edit"></i> 编辑</a>
								
								<a class="btn btn-danger" onclick="deletes(${users.custom_user_id})"><i class="glyphicon glyphicon-trash"></i> 删除</a>
							</td>
						</tr>
						</c:forEach>
					</tbody>
					</table>
                     <div class="larry-table-page clearfix">
				          <a href="#" class="layui-btn layui-btn-normal" onclick="up()">上一页</a>
				          &nbsp;&nbsp;&nbsp;
				          <a class="layui-btn layui-btn-normal" href="#" onclick="next()" >下一页</a>
			         </div>
		</div>
</form>

</section>
</body>
<script type="text/javascript" src="/bsc/static/common/layui/layui.js"></script>
<script type="text/javascript" src="/bsc/static/common/bootstrap/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="/bsc/static/common/bootstrap/js/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
</html>